package com.eatme.web.security.domain.vo;

import com.eatme.web.validation.annotation.PasswordMatches;
import com.eatme.web.validation.annotation.ValidEmail;
import com.eatme.web.validation.annotation.ValidPassword;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
@PasswordMatches
public class UserRequest implements Serializable {

    @NotNull
    @NotBlank
    @Size(min = 4,max = 20,message = "用户名长度必须在4到20个字符之间")
    private String username;

//    @NotNull
//    @NotBlank
//    @Size(min = 8,max = 20,message = "密码长度必须在8到20个字符之间")
    @ValidPassword
    private String password;

    private String matchingPassword;

    @ValidEmail
    private String email;

    private String telephone;


    private String accessToken;

    private String refreshToken;


    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMatchingPassword() {
        return matchingPassword;
    }

    public void setMatchingPassword(String matchingPassword) {
        this.matchingPassword = matchingPassword;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
}
